/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
using DGZImp.SysEntity;

namespace DGZImp.BasProject.DomainModels
{
    [Entity(TableCnName = "产品工艺",TableName = "Bas_RouteName",DetailTable =  new Type[] { typeof(Bas_RouteControl),typeof(Bas_RouteUsage)},DetailTableCnName = "工艺步骤,工艺产品",DBServer = "ServiceDbContext")]
    public partial class Bas_RouteName:ServiceEntity
    {
        /// <summary>
       ///工艺编码
       /// </summary>
       [Display(Name ="工艺编码")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string RouteCode { get; set; }

       /// <summary>
       ///工艺名称
       /// </summary>
       [Display(Name ="工艺名称")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string RouteName { get; set; }

       /// <summary>
       ///工艺描述
       /// </summary>
       [Display(Name ="工艺描述")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       public string RouteDesc { get; set; }

       /// <summary>
       ///投入工站
       /// </summary>
       [Display(Name ="投入工站")]
       [Column(TypeName="bigint")]
       public long? FirstGroup { get; set; }

       /// <summary>
       ///产出站
       /// </summary>
       [Display(Name ="产出站")]
       [Column(TypeName="bigint")]
       public long? EndGroup { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="ParentId")]
       [Column(TypeName="bigint")]
       public long? ParentId { get; set; }

       /// <summary>
       ///1是目录，2是文件
       /// </summary>
       [Display(Name ="1是目录，2是文件")]
       [Column(TypeName="int")]
       public int? Type { get; set; }

       /// <summary>
       ///1不禁用，2禁用
       /// </summary>
       [Display(Name ="1不禁用，2禁用")]
       [Column(TypeName="int")]
       public int? Enabled { get; set; }

       /// <summary>
       ///版本
       /// </summary>
       [Display(Name ="版本")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string Version { get; set; }

       /// <summary>
       ///画布信息
       /// </summary>
       [Display(Name ="画布信息")]
       [Column(TypeName="nvarchar(max)")]
       public string Info { get; set; }

       /// <summary>
       ///1通用流程,2按适用机种,3按适用型号
       /// </summary>
       [Display(Name ="1通用流程,2按适用机种,3按适用型号")]
       [Column(TypeName="int")]
       public int? ControlType { get; set; }

       /// <summary>
       ///排序
       /// </summary>
       [Display(Name ="排序")]
       [Column(TypeName="int")]
       public int? Sequence { get; set; }

       /// <summary>
       ///ID
       /// </summary>
       [SugarColumn(IsPrimaryKey = true)]
       [Key]
       [Display(Name ="ID")]
       [Column(TypeName="bigint")]
       [Required(AllowEmptyStrings=false)]
       public long RouteNameId { get; set; }

       /// <summary>
       ///是否有效
       /// </summary>
       [Display(Name ="是否有效")]
       [Column(TypeName="int")]
       public int? IsValid { get; set; }

       /// <summary>
       ///创建用户
       /// </summary>
       [Display(Name ="创建用户")]
       [Column(TypeName="bigint")]
       public long? CreateId { get; set; }

       /// <summary>
       ///创建人
       /// </summary>
       [Display(Name ="创建人")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       public string Creator { get; set; }

       /// <summary>
       ///创建时间
       /// </summary>
       [Display(Name ="创建时间")]
       [Column(TypeName="datetime")]
       public DateTime? CreateTime { get; set; }

       /// <summary>
       ///修改用户
       /// </summary>
       [Display(Name ="修改用户")]
       [Column(TypeName="bigint")]
       public long? ModifyId { get; set; }

       /// <summary>
       ///修改人
       /// </summary>
       [Display(Name ="修改人")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       public string Modifier { get; set; }

       /// <summary>
       ///修改时间
       /// </summary>
       [Display(Name ="修改时间")]
       [Column(TypeName="datetime")]
       public DateTime? ModifyTime { get; set; }

       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(512)]
       [Column(TypeName="nvarchar(512)")]
       [Editable(true)]
       public string Remarks { get; set; }

       /// <summary>
       ///是否用当前这个版本工艺
       /// </summary>
       [Display(Name ="是否用当前这个版本工艺")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? UseFlag { get; set; }

       [Display(Name ="工艺步骤")]
       [ForeignKey("RouteNameId")][Navigate(NavigateType.OneToMany,nameof(RouteNameId),nameof(RouteNameId))]
       public List<Bas_RouteControl> Bas_RouteControl { get; set; }


       [Display(Name ="工艺产品")]
       [ForeignKey("RouteNameId")][Navigate(NavigateType.OneToMany,nameof(RouteNameId),nameof(RouteNameId))]
       public List<Bas_RouteUsage> Bas_RouteUsage { get; set; }


       
    }
}